//
//  PartTemplateSpecilizationPoint.cpp
//  learnC++
//
//  Created by liuzhibing on 2018/6/21.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#include "PartTemplateSpecilizationPoint.hpp"


//这种情况只能用于char *，那么int *呢？
template <>
Storage4<char *>::Storage4(char *value){
    int length = 0;
//    while (value[length] != '\0') {
//        ++length;
//    }
    
    length = (int)strlen(value);
    
    ++length;
    
    m_value = new char[length];
    
    for (int i = 0; i <length; ++i) {
        m_value[i] = value[i];
    }
    
    printf("CHAR *");
}

template <>
Storage4<char *>::~Storage4(){
    delete [] m_value;
}

